#ifndef MENU1_H
#define MENU1_H

// Input Manager class, handles user input for electrical parameters
class InputManager {
    public:
        double Vin;          // Input voltage
        double Vout;         // Output voltage
        double rippleVoltage; // Voltage ripple
        double rippleCurrent; // Current ripple
        double frequency;    // Operating frequency
        double loadR;        // Load resistance
        
        // Function to get input parameters from the user
        void getInput();
        
        // Function to validate the user input for correctness
        bool validateInput();
};

// Calculator class, inherits from InputManager, performs circuit mode calculations
class Calculator : public InputManager {
    public:
        double dutyCycle;    // Duty cycle
        double inductance;   // Inductance value
        double capacitance;  // Capacitance value
        
        // Determines the operating mode of the circuit (e.g., Boost or Buck)
        std::string determineMode();
        
        // Performs Boost converter calculations
        void calculateBoost();
        
        // Performs Buck converter calculations
        void calculateBuck();
};

// Result Manager class, inherits from Calculator, handles displaying and saving results
class ResultManager : public Calculator {
    public:
        // Displays the calculation results
        void displayResults(const std::string& mode);
        
        // Saves the results to a CSV file
        void saveResultsToCSV(const string& mode);
        
        // Displays the last calculated results
        void displayLastResults(void);
};

// Function to display the main menu
void displayMenu(void);

#endif // MENU1_H
